package com.passioneffect.widgets {
	import flash.display.DisplayObject;
	import gs.TweenMax;	

	/**
	 * @author Passion Effect
	 */
	public class Brightness {
		private var _brightness:Number = 0.5;
		private var _time : Number=0.2;
		private var _target : DisplayObject;

		public function Brightness(mc:DisplayObject,time:Number=0.2,brightness:Number=0.5) {
			this._target=mc;
			this._time=time;
			this._brightness = brightness;	
		}
		
		public function open() : void {
			TweenMax.to(_target,_time,{colorMatrixFilter:{brightness:_brightness}});
		}
		
		public function close():void{
			TweenMax.to(_target,_time,{colorMatrixFilter:{brightness:1}});
		}
	}
}
